package User;

public class User {
    private String id;
    private String key;
    private String email;

    public void makePlayer(String id, String key) {
        this.id = id;
        this.key = key;
    }

    public void makePlayer(String id, String key, String email) {
        this.id = id;
        this.key = key;
        this.email = email;
    }

    public void playerShow() {
        System.out.println("账号：" + this.id);
        System.out.println("密码：" + this.key);
        if (email == null || email.isEmpty()) {
            System.out.println("该用户未绑定邮箱！");
        } else {
            System.out.println("邮箱为：" + this.email);
        }
    }

    public static void main(String[] args) {
        User p1 = new User();
        User p2 = new User();

        p1.makePlayer("郭楚涵", "123456");
        p2.makePlayer("海绵宝宝", "654321", "123456@qq.com");

        p1.playerShow();
        p2.playerShow();
    }
}